// 二维数组
#include <stdio.h>
#include <string.h>

int main(int argc, char const *argv[])
{
    int ii = 0;
    int jj = 0;
    int total = 5;
    int class = 3;
    double sum;

    double weight[class][total];

    memset(weight, 0, sizeof(weight));

    for (ii = 0; ii < class; ii++)
    {
        sum = 0;
        for (jj = 0; jj < total; jj++)
        {
            printf("请输入第%d组%d位女生的体重：", ii + 1, jj + 1);
            scanf("%lf", &weight[ii][jj]);
            sum += weight[ii][jj];
        }
        printf("第%d组女生的平均体重是：%lf\n", ii + 1, sum / total);
    }
    return 0;
}
